using AutoMapper;
using EIMS.Models.Identity;
using EIMS.Models.AccountViewModels;

namespace EIMS.Data
{
    public class AutoMapperProfile : Profile
    {
        public AutoMapperProfile()
        {
            // 用户模型映射
            CreateMap<ApplicationUser, ProfileViewModel>();
            CreateMap<ProfileViewModel, ApplicationUser>()
                .ForMember(dest => dest.UserName, opt => opt.Ignore())
                .ForMember(dest => dest.CreatedDate, opt => opt.Ignore())
                .ForMember(dest => dest.LastLoginDate, opt => opt.Ignore());
        }
    }
} 